home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / misc / vhlogger_v2.lzh / testrexx.vh < prev    next >
Text File  |  1992-07-05  |  1KB  |  45 lines

  1. /* testrexx.vh    */
  2. /* version    1  07/05/92 */
  3. /* author    Vince Herried (ka8cte) */
  4. /* purpose    test and serve as a demo on using vhlogger and a rexx exec */
  5.  
  6. options results
  7.  
  8. address "vhlogger"
  9. 'version'
  10. if index(result,"VHlogger 2.01") = 0 then do
  11.    say "VHlogger version other than expected"
  12.    say result
  13. end
  14. exit(0)
  15.  
  16. do until (ans = "END")
  17.    say "Available commands:  version,find,open,close,quit,"
  18.    say "testadd, or END to end this exec?"
  19.    say "Your command?"
  20.    pull ans arg      /* note, all parms are retreived in upper case */
  21.  
  22.    if ans = "END" then exit(0)
  23.    else
  24.      if ans = "TESTADD" then do
  25.        say "update dummy;Vince;920701;0700;0800;449;559;1688 Staffordshire RD;Columbus;oh;43229;comment;yy;y;2;2;"
  26.        "update dummy;Vince;920701;0700;0800;449;559;1688 Staffordshire RD;Columbus;oh;43229;comment;yy;y;2;2;"
  27.        if rc ~= 0 then do
  28.      say "testadd command failed with a return code of" rc
  29.      say "Possible causes: data base not open, data base full,"
  30.      say "vhlogger is not running (should have failed sooner tho)"
  31.      say "vhlogger is broken"
  32.      end
  33.    else
  34.    '' ans arg
  35.    say "RC=" rc
  36.    say "Result="result
  37.    result=""
  38.    if ans = "CLOSE" then do
  39.       "QUIT"
  40.       exit(0)
  41.    end
  42.    if ans = "QUIT" then exit(0);
  43. end
  44.  
  45.